<script>
import { ref } from 'vue';
import {  useRouter } from "vue-router";
export default {
    setup() {
        const checked = ref(false);
        
        let router = useRouter();

        let back = () =>{
            router.back()
        }

        //跳转手机号
        let phone = () => {
            router.push("/phone")
        }
        return {
            checked,
            back,
            phone
        }
    },
}
</script>

<template>
    <div class="tomato_box">
        <div class="container">
            <div class="tomato_top">
                <span class="iconfont icon-arrow-left" @click="back"></span>
                <h3>账号与安全</h3>
            </div>
            <div class="tomato_main">
                <ul>
                    <li @click="phone">
                        <p>手机号</p>
                        <div class="right">
                            <span>132****5272</span>
                            <span class="iconfont icon-xuanxiangqiayoujiantou"></span>
                        </div>
                    </li>
                    <li>
                        <p>抖音</p>
                        <van-switch v-model="checked" size="15px" active-color="#fe631b" inactive-color="#dcdee0" />
                    </li>
                </ul>
            </div>
            <div class="to_cache">
                <p>注销账号</p>
                <span class="iconfont icon-xuanxiangqiayoujiantou"></span>
            </div>
        </div>
    </div>
</template>

<style lang="scss">
@import "../assets/font-two/iconfont.css";

.tomato_box {
    background-color: #f6f6f6;
    padding: 20px 16px 415px 16px;

    .tomato_top {
        display: flex;
        align-items: baseline;

        h3 {
            margin: 0 auto;
            font-weight: 600;
        }

        .icon-arrow-left {
            font-size: 17px;
        }
    }

    .tomato_main {
        background-color: #fff;
        border-radius: 10px;
        margin-top: 25px;

        ul {
            li {
                display: flex;
                justify-content: space-between;
                padding: 18px;
                align-items: center;

                p {
                    font-size: 15px;
                }

                .right {
                    span {
                        color: #ccc;
                        margin-left: 10px;
                       
                    }
                    .iconfont{
                            font-size: 14px;
                        }
                }


            }
        }
    }
    .to_cache {
        background-color: #fff;
        padding: 18px;
        display: flex;
        justify-content: space-between;
        border-radius: 10px;
        margin-top: 15px;

        p {
            font-size: 15px;
        }

        span {
            color: #cccccc;
        }
    }
}
</style>